package com.tiancheng.trade.merchant.exception.error;

import lombok.AllArgsConstructor;

/**
 * 通用返回结果
 * 编码 9 打头
 *
 * @author kellen
 * @date 2019-09-03
 * @changed kellen at 2021/07/15
 */
@AllArgsConstructor
public enum CommonErrorEnum {
    VALID_ERROR(9995, "参数校验异常"),
    ARGS_ERROR(9996, "参数异常"),
    SQL_ERROR(9997, "SQL异常"),
    AUTH_ERROR(9998, "无权访问"),
    UNKNOWN(9999, "未知异常"),
    ;

    /**
     * 返回码
     */
    private int code;
    /**
     * 返回消息
     */
    private String message;

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
